<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
  
  <head>
    
    <%@ include file="/WEB-INF/include/meta.jsp"%>
    <%@ include file="/WEB-INF/include/css.jsp"%>
    
  </head>
  <!-- end header -->
  <body>
    <div class="page-group">
      <div class="page page-current">
        
        <header class="bar bar-nav fs-header-small">
          <a href="${ctx.host}/profile/inbody" class="icon icon-left pull-left"></a>
          <h1 class="title">身体数据记录</h1>
        </header>
        
      <!-- end header -->

      <div class="content body-data">
        
        <c:choose>
          <c:when test="">
            <div class="card" style="margin: .5rem 0;">
              <div class="card-content">
                <div class="card-content-inner text-center">
                  <div class="card-title">无记录</div>
                  <p class="color-gray">你还没有任何数据,快起参加体测吧</p>
                </div>
              </div>
            </div>
          </c:when>
          <c:otherwise>
            
            <div class="card" style="margin: .5rem 0;">
              <div class="card-content">
                <div class="card-header">
                  BMI
                </div>
                <canvas id="bmi_canvas" style="padding:0 .5rem;"></canvas>
              </div>
            </div>
            
            <div class="card" style="margin: .5rem 0;">
              <div class="card-content">
                <div class="card-header">
                  体重
                </div>
                <canvas id="weight_canvas" style="padding:0 .5rem;"></canvas>
              </div>
            </div>
            
            <div class="card" style="margin: .5rem 0;">
              <div class="card-content">
                <div class="card-header">
                  骨骼肌
                </div>
                <canvas id="sm_canvas" style="padding:0 .5rem;"></canvas>
              </div>
            </div>
            
            <div class="card" style="margin: .5rem 0;">
              <div class="card-content">
                <div class="card-header">
                  体脂肪
                </div>
                <canvas id="bf_canvas" style="padding:0 .5rem;"></canvas>
              </div>
            </div>
            
            
            <div class="card" style="margin: .5rem 0;">
              <div class="card-content">
                <div class="card-header">
                  体脂率
                </div>
                <canvas id="bfr_canvas" style="padding:0 .5rem;"></canvas>
              </div>
            </div>
            
            <div class="card" style="margin: .5rem 0;">
              <div class="card-content">
                <div class="card-header">
                  腰臀比
                </div>
                <canvas id="whr_canvas" style="padding:0 .5rem;"></canvas>
              </div>
            </div>
            
            <div class="card" style="margin: .5rem 0;">
              <div class="card-content">
                <div class="card-header">
                  基础代谢
                </div>
                <canvas id="bm_canvas" style="padding:0 .5rem;"></canvas>
              </div>
            </div>
            
          </c:otherwise>
        </c:choose>
        
      </div>  
      <!-- end content -->
        
      </div>
    </div>
    
    <%@ include file="/WEB-INF/include/script.jsp"%>
    <script type="text/javascript">
      var records = JSON.parse('${records}');
      require(['page/profile/inbody-record'], function(page) {
        page.init(records)
      })
    </script>
    
  </body>
</html>